<template>
  <div class="manager-list"> 
    <tx-tab :tabs="tabs" :hideHeader="tabs.hideHeader" />
  </div>
</template>

<script>
 
import List from "./list.vue";
import Expert from "./expert.vue";
let dicts={
  "1000000001":{
      leader:{
        name:"党委领导",
        isLeader:"1",
      },
      member:{
        name:"党委总值班室成员",
        isLeader:"0",
      },
  },
  "1000000002":{
      leader:{
        name:"政府领导",
        isLeader:"1",
      },
      member:{
        name:"政府总值班室成员",
        isLeader:"0",
      },
  },
  "1000000007":{     
      hideHeader: true,
      leader:{
        name:"内设机构人员",
        isLeader:"0",
      },
  },
  "1000000009":{     
      hideHeader: true,
      leader:{
        name:"单位领导",
        isLeader:"0",
      },
  },
  "1000000013":{     
      hideHeader: true,
      expert:{
        name:"专家成员",
        isLeader:"0",
      },
  },
  "1000000015":{     
      hideHeader: true,
      leader:{
        name:"指挥体系成员",
        isLeader:"0",
      },
  },
  "1000000016":{     
      hideHeader: true,
      leader:{
        name:"嘎查、村、屯人员",
        isLeader:"0",
      },
  }
}




export default {
  data() {
    return {
      tabs: {
        hideHeader: false,
        active: "leader",
        list: [ ]
      }, 

    };
  },
  components: {
    List
  },

  mounted() {
    let dict=dicts[this.getParameter("menuId")]
    console.log(dict);
    this.tabs.hideHeader=dict.hideHeader
    this.tabs.list=[]
    if(dict.leader){
      this.tabs.list.push( { label: dict.leader.name, name: "leader", dict: dict.leader, component: List, number: 0, })
    } 
    if(dict.member){
      this.tabs.list.push( { label: dict.member.name, name: "member", dict: dict.member, component: List, number: 0, })
    }
    if(dict.expert){
      this.tabs.active="expert"
      this.tabs.list.push( { label: dict.expert.name, name: "expert", dict: dict.expert, component: Expert, number: 0, })
    } 
  },
  methods: {

  }
};
</script>


<style lang="scss">
.manager-list {
    position: relative;
    border: 2px solid $c-bd-content;
    padding: 15px;
    min-height: calc(100% - 48px) ;
    height: calc(100% - 48px) ;
    .el-tabs__item {
         padding: 0 5px;
        .tx-tab__label{
            color: #fff;
            min-width: 80px;
            max-width: 300px; 
            padding: 0px 20px;
        }
    }
    .el-tabs__item.is-active {
        .tx-tab__label{ 
            box-shadow: inset 0px 0px 10px $tx-color-primary; 
            // background: #285584;
        }
    }

}
</style>


